﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="organization_unit.aspx.cs" Inherits="EDP.Application.Web.Organization.organization_unit" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <script type="text/javascript">
        document.onkeydown = function (e) {
            if (!e) e = window.event;
            if ((e.keyCode || e.which) == 13) {
                F.f_disable('panel_grid_List_ctl00_btn_query');
                __doPostBack('panel$grid_List$ctl00$btn_query', '');
            }
        }
    </script>
    <style type="text/css">
        .x-column-header {
            text-align: center;
        }
    </style>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager" AutoSizePanelID="panel" runat="server" />
        <f:HiddenField ID="hidden_itemId" runat="server" />
        <f:HiddenField ID="hidden_fullCode" runat="server" />
        <f:Panel ID="panel" runat="server" ShowBorder="false" Margin="10" Layout="Region">
            <Items>
                <f:Tree ID="tree_org" runat="server" Title="组织架构" Margin="0" Width="260" RegionPosition="Left" OnNodeCommand="tree_org_NodeCommand" />
                <f:Grid ID="grid_List" runat="server" Title="组织单元列表" DataKeyNames="ID,PropertyId,Name" Margin="0 0 0 5" RegionPosition="Center" AllowSorting="false" AllowPaging="false" EnableCheckBoxSelect="false"
                    OnPreRowDataBound="grid_List_PreRowDataBound" OnRowCommand="grid_List_RowCommand">
                    <Toolbars>
                        <f:Toolbar runat="server" ToolbarAlign="Right" QueryToolbar="true">
                            <Items>
                                <f:DropDownList ID="ddl_type" runat="server" QueryName="OrganizationTypeId" Margin="0" Width="150" />
                                <f:TextBox ID="tb_keywrod" runat="server" EmptyText="组织单元名称/组织单元编号" QueryName="NumbersNameKeywrod" Margin="0 0 0 10" Width="240" />
                                <f:Button ID="btn_query" runat="server" Text=" 查 询 " Icon="SystemSearch" Margin="0 0 0 10" OnClick="QueryClick" />
                                <f:ToolbarFill runat="server" />
                                <f:Button ID="btn_organization_add" runat="server" Text="新增机构" Icon="Add" Margin="0 10 0 0" OnClick="btn_organization_add_Click" />
                                <f:Button ID="btn_deaprtment_add" runat="server" Text="新增部门" Icon="Add" OnClick="btn_department_add_Click" />
                                <f:Button ID="btn_more" runat="server" EnablePermission="false" Text="更多..." EnablePostBack="false">
                                    <Menu runat="server" Margin="0">
                                        <f:MenuButton ID="btn_chart" runat="server" Margin="0" Text="组织架构图" EnablePostBack="false" />
                                        <f:MenuButton ID="btn_cache" runat="server" Margin="0" Text="重置缓存" OnClick="btn_cache_Click" />
                                    </Menu>
                                </f:Button>
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                    <Columns>
                        <f:BoundField DataField="PropertyName" Width="50" EnableLock="true" HeaderText="性质" />
                        <f:BoundField DataField="Name" DataSimulateTreeLevelField="LevelsDisplay" ExpandUnusedSpace="true" HeaderText="名称" />
                        <f:BoundField DataField="Numbers" Width="150" HeaderText="编号" />
                        <f:BoundField DataField="ParentName" Width="150" HeaderText="上级组织" />
                        <f:BoundField DataField="OrganizationTypeName" Width="120" HeaderText="组织类型" NullDisplayText="机构" />
                        <f:BoundField DataField="CreateUserName" Width="80" HeaderText="创建人" />
                        <f:BoundField DataField="CreateTime" Width="140" HeaderText="创建时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />                        
                        <f:LinkButtonField ColumnID="lb_enable" Width="75" CommandName="enable" EnableLock="true" HeaderText="启用状态" CommandTitle="设置组织单元启用状态" ConfirmTarget="Self" ConfirmIcon="Question" TextAlign="center" />
                        <f:LinkButtonField ColumnID="lb_permission" Width="30" CommandName="permission" CommandTitle="设置权限" ToolTip="设置权限" EnableLock="true" Icon="ApplicationKey" TextAlign="center" />
                        <f:LinkButtonField ColumnID="lb_edit" Width="30" CommandName="edit" EnableLock="true" ToolTip="编辑" CommandTitle="编辑组织单元" Icon="TableEdit" TextAlign="center" />
                        <f:LinkButtonField ColumnID="lb_delete" Width="30" CommandName="delete" EnableLock="true" ToolTip="删除" CommandTitle="删除组织单元" Icon="Delete"
                            ConfirmTitle="删除组织单元" ConfirmText="是否删除该组织单元？" ConfirmTarget="Self" ConfirmIcon="Question" TextAlign="center" />
                    </Columns>
                </f:Grid>
            </Items>
        </f:Panel>
        <f:Window ID="win_edit" runat="server" OnClose="win_edit_Close" />
        <f:Window ID="win_chart" runat="server" Target="Top" />
        <f:Window ID="win_permission" runat="server" />
    </form>
</body>
</html>
